﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITypeManager.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the ITypeManager type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Business.Interfaces
{
    using System.Collections.Generic;
    using Entities;

    /// <summary>
    /// Defines the <seealso cref="Hisaab.Business.Interfaces.ITypeManager"/> interface.
    /// </summary>
    public interface ITypeManager
    {
        /// <summary>
        /// Lists the account types.
        /// </summary>
        /// <param name="query">The query.</param>
        /// <param name="pageNo">Page number to fetch</param>
        /// <param name="pageSize">Page size to fetch</param>
        /// <returns>List of account types matching query</returns>
        IEnumerable<AccountType> ListAccountTypes(AccountType query = null, int? pageNo = null, int? pageSize = null);

        /// <summary>
        /// Gets the account type by id.
        /// </summary>
        /// <param name="id">The account type id.</param>
        /// <returns>Account type matching id</returns>
        AccountType GetAccountTypeById(int id);

        /// <summary>
        /// Gets the name of the account type by.
        /// </summary>
        /// <param name="name">The name of account type</param>
        /// <returns>Account type matching id</returns>
        AccountType GetAccountTypeByName(string name);
    }
}